import App from '@/App.vue'

const http = uni.$u.http
// AppID
const AppID = App.globalData.AppID
// App秘钥
const AppSecret = App.globalData.AppSecret
// 项目ID
const project_id = App.globalData.project_id

export default {
	/**
	 * 获取所有商品分类信息
	 *  - get请求
	 *  - {object} data
	 *  	- {string} page
	 *  	- {string} limit
	 *  	- {string} status
	 */
	getAllClassifyAPI: (data) => {
		return http.get('/classify', {
			params: {
				project_id,
				...data
			}
		})
	},

	/**
	 * 获取每个分类下的商品信息
	 *  - get请求
	 */
	getGoodsByClassifyAPI: () => {
		return http.get('/classify/classifyGoods', {
			params: {
				project_id,
			}
		});
	}
}